
from .api_index import ApiIndex

from flask import Flask, request, Blueprint

from . import app_index


@app_index.route('/index', methods=['GET', 'PUT'])
    
def index():
    
    methods = request.method

    info = request.args

    page = info.get('page')

    limit = info.get('limit')

    party = info.get('party')

    with ApiIndex() as conn_api:

        result_info = conn_api.index(methods, page, limit, party)

    return result_info
    

    